package cn.tedu.web;

import cn.tedu.vo.JsonResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobleHandlerException {
    @ExceptionHandler(RuntimeException.class)
    public JsonResult doHandllerRumtimeException(RuntimeException e){
        return new JsonResult(e.getMessage());
    }
}
